
#import "M1DragCardView.h"

@implementation M1DragCardView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self defaultStyle];
    }
    return self;
}

- (instancetype)init {
    self = [super init];
    if (self) {
        [self defaultStyle];
    }
    return self;
}

- (void)awakeFromNib {
    [self defaultStyle];
}

- (void)defaultStyle {
    
    self.userInteractionEnabled = YES;

    [self.layer setMasksToBounds:NO];
    [self.layer setCornerRadius:10.0f];
    self.layer.shouldRasterize = YES;
    self.layer.rasterizationScale = [[UIScreen mainScreen] scale];
    
    CGFloat scaleBackgroud = 245.0f / 255.0f;
    self.backgroundColor = [UIColor colorWithRed:scaleBackgroud green:scaleBackgroud blue:scaleBackgroud alpha:1];
    
    self.layer.shadowOffset = CGSizeMake(0, 2);
    self.layer.shadowColor = [UIColor m1_colorHex:0xdddddd].CGColor;
    self.layer.shadowRadius = 1;
    self.layer.shadowOpacity = 0.5;

}

- (void)m1_layoutSubviews {}

@end
